<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ page contentType="text/html;charset=utf-8" pageEncoding="utf-8"
	language="java"%>
<%@ include file="/jsp/platform/include/include.jsp"%>
<script src="<%=request.getContextPath()%>/script/jquery-1.4.2.js"
	type="text/javascript"></script>
<LINK href="<%=request.getContextPath()%>/style/easyui.css" rel="stylesheet" type="text/css">
<SCRIPT src="<%=request.getContextPath()%>/script/jquery.easyui.min.js" type="text/javascript"></SCRIPT>	
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
* {
	padding: 0;
	margin: 0;
}

body {
	color: #4e4e4e;
}

li {
	list-style: none;
}

a {
	text-decoration: none;
}

input,img,select {
	vertical-align: middle;
}

.modalWindowWrapper {
	padding: 20px;
}

.listWrapper {
	width: 350px;
	margin: 0 auto;
	overflow: hidden;
	padding: 0 0 10px;
}

.listLeft,.listRight {
	display: block;
	height: 40px;
	line-height: 40px;
	font-family: microsoft yahei;
	font-size: 16px;
}

.listLeft {
	width: 120px;
	text-align: right;
	float: left;
}

.listRight {
	width: 220px;
	padding-left: 10px;
	float: right;
}

.btnConfirm,.btnCancel {
	display: block;
	width: 80px;
	height: 40px;
	line-height: 40px;
	text-align: center;
	font-family: microsoft yahei;
	font-size: 16px;
	float: left;
	border: none;
	cursor: pointer;
}

.btnConfirm {
	background: #c2352a;
	color: #fff;
}

.btnCancel {
	background: #d7d7d7;
	color: #4e4e4e;
	margin-left: 40px;
}
</style>
<script type="text/javascript">
        $(document).ready(function() {
			//开户行
	        <common:getDicListByKey key="2100" var="depositBankList"/>
			$("#depositBank").val("<c:out value='${model.depositBank}'/>");
		})
        /**
         　　               修改
         */
        function settleCardChangeApplyTaskAdd() {
            var _msg = "";
            if (isBlank($("#settleId").val())) {
                _msg = "菜单名称不能为空\n";
            }
            if (_msg != "") {
                $.messager.alert("提示信息", _msg);
            } else {
               var applyType = '<c:out value="${_LOGONUSER_.operatorInfoModel.operatorType}"/>';
			   var operatorName = '<c:out value="${_LOGONUSER_.operatorInfoModel.loginName}"/>';
                var url = '<%=request.getContextPath()%>/manage/todoTask/settleCardChangeApplyTaskAdd';
                $.post(
                        url,
                        {
                            'settleId' : $("#settleId").val(),
                            'depositBank' : $("#depositBank").val(),
                            'depositBankbranch' : $("#depositBankbranch").val(),
                            'bankUsrname' : $("#bankUsrname").val(),
                            'bankAccount' : $("#bankAccount").val(),
                            
                            'settleCardInfoModel.settleId' : $("#settleId").val(),
							'settleCardInfoModel.depositBank' : $("#depositBank").val(),
							'settleCardInfoModel.depositBankbranch' : $("#depositBankbranch").val(),
							'settleCardInfoModel.bankUsrname' :  $("#bankUsrname").val(),
							'settleCardInfoModel.bankAccount' :  $("#bankAccount").val(),
							'todoTaskModel.taskType':'6',//结算银行变更
							'todoTaskModel.taskOperatorType':'2',//修改
							//	1、	系统人员发起 2、	代理人发起
							'todoTaskModel.applyType':applyType,
							'todoTaskModel.applyOperator':operatorName,
							'todoTaskModel.approveStatus':'0',
							'todoTaskModel.taskKey':$("#settleId").val()
							
                        },
                        function(data) {
                            if (data.success) {
                                $.messager.alert("提示信息", "更换申请已提交,请等待审核!","info",function(){
							          window.parent.document.location = window.parent.document.location;
	                                parentDialog.close();
						        });
                            } else {
                                $.messager.alert("提示信息", data.msg);
                            }
                        });
            }
        }
        function Btnclose() {
            parentDialog.close();
        }
        function isBlank(obj) {
		    if ("" == obj || undefined == obj) {
		        return true;
		    }
		    return false;
		}
    </script>
</head>

<body>
	<div class="modalWindowWrapper">
		<input type="hidden" id="settleId" name="settleId"
			value="<c:out value='${model.settleId}'/>" />
		<ul class="listWrapper">
			<li class="listLeft">开户行：</li>
			<li class="listRight"><select id="depositBank" name="settleCardInfoModel.depositBank">
														<option value="">开户行</option>
														<c:forEach var="list" items="${depositBankList}">
														<option value="${list.dirValue}"><c:out value='${list.dirCaption}'/></option>
														</c:forEach>
													</select>
			</li>
		</ul>
		<ul class="listWrapper">
			<li class="listLeft">开户行支行：</li>
			<li class="listRight"><input type="text"
				style="width:210px;height:34px;line-height:34px;float:left;"
				name="depositBankbranch" id="depositBankbranch" value="<c:out value='${model.depositBankbranch}'/>" />
			</li>
		</ul>
		<ul class="listWrapper">
			<li class="listLeft">开户名：</li>
			<li class="listRight"><input type="text"
				style="width:210px;height:34px;line-height:34px;float:left;"
				name="bankUsrname" id="bankUsrname" value="<c:out value='${model.bankUsrname}'/>" />
			</li>
		</ul>
		<ul class="listWrapper">
			<li class="listLeft">开户账号：</li>
			<li class="listRight"><input type="text"
				style="width:210px;height:34px;line-height:34px;float:left;"
				name="bankAccount" id="bankAccount"
				value="<c:out value='${model.bankAccount}'/>" />
			</li>
		</ul>
		<div
			style="width:200px;margin:0 auto;overflow:hidden;padding-top:10px;">
			<input class="btnConfirm" type="button" onclick="settleCardChangeApplyTaskAdd()"
				value="确定" /> <input class="btnCancel" type="button"
				onclick="Btnclose()" value="取消" />
		</div>
	</div>
</body>
</html>
